package org.mock.service.impl;

import org.mock.entity.SabreCreatePassenger;
import org.mock.mapper.SabreCreatePassengerMapper;
import org.mock.service.SabreCreatePassengerService;
import org.mock.dto.SabreCreatePassengerDTO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.mock.common.Condition;
import org.mock.utils.BeanCopyUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.AllArgsConstructor;
import cn.hutool.core.util.StrUtil;
import java.util.List;

/**
 * sabre_create_passenger 服务实现类
 *
 * @author AI
 * @since 2025-06-11
 */
@Service
@AllArgsConstructor
public class SabreCreatePassengerServiceImpl implements SabreCreatePassengerService {

    protected SabreCreatePassengerMapper sabreCreatePassengerMapper;

    @Override
    public Integer updateById(SabreCreatePassengerDTO dto) {
        return sabreCreatePassengerMapper.updateById(BeanCopyUtils.copy(dto,SabreCreatePassenger.class));
    }

    @Override
    public SabreCreatePassenger getOne(SabreCreatePassengerDTO dto) {
        return sabreCreatePassengerMapper.selectOne(Condition.getQueryWrapper(BeanCopyUtils.copy(dto,SabreCreatePassenger.class)));
    }
}
